import { program } from 'commander'
// @ts-ignore
import pkg from '../package.json'
import { createComponent } from './command/create-component'
import { createIcon } from './icon'
import { buildStyle } from './style'

export const mainEntry = () => {
  program.version(pkg.version).usage('<command> [arguments]')

  program.command('create').action(createComponent)

  program.command('icon').action(createIcon)

  program.command('build:style').action(buildStyle)

  program.parse(process.argv)

  program.args.length || program.help()
}
